package com.myframe.demo.job;

import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class TestJob implements Job {
	Logger log = Logger.getLogger(TestJob.class);
	static private boolean b= true;
	
	public void execute(JobExecutionContext arg0) throws JobExecutionException {
		if(b){
			b=false;
		 String name = arg0.getJobDetail().getJobDataMap().getString("name");
		 log.info("========执行===TestJob==");
		 
	      try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		b=true;
		}else{
			log.info("=======正在=执行===TestJob=====跳过=");
		}
		
	}

}
